Optimal. Leaf size=387 \[ -\frac {\left (3 a^2 b B-2 b^3 B-a b^2 (A-4 C)-5 a^3 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^3 \left (a^2-b^2\right ) d}+\frac {\left (3 A b^2-3 a b B+5 a^2 C-2 b^2 C\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 b^2 \left (a^2-b^2\right ) d}-\frac {\left (3 A b^4+3 a^3 b B-5 a b^3 B-a^2 b^2 (A-7 C)-5 a^4 C\right ) \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{(a-b) b^3 (a+b)^2 d}+\frac {\left (3 A b^2-3 a b B+5 a^2 C-2 b^2 C\right ) \sin (c+d x)}{3 b^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}+\frac {\left (3 a^2 b B-2 b^3 B-a b^2 (A-4 C)-5 a^3 C\right ) \sin (c+d x)}{b^3 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (b+a \cos (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 1.03, antiderivative size = 387, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 7, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.163, Rules used = {4197, 3134,
3138, 2719, 3081, 2720, 2884} \begin {gather*} \frac {F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (5 a^2 C-3 a b B+3 A b^2-2 b^2 C\right )}{3 b^2 d \left (a^2-b^2\right )}-\frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \cos ^{\frac {3}{2}}(c+d x) (a \cos (c+d x)+b)}+\frac {\sin (c+d x) \left (5 a^2 C-3 a b B+3 A b^2-2 b^2 C\right )}{3 b^2 d \left (a^2-b^2\right ) \cos ^{\frac {3}{2}}(c+d x)}-\frac {E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (-5 a^3 C+3 a^2 b B-a b^2 (A-4 C)-2 b^3 B\right )}{b^3 d \left (a^2-b^2\right )}+\frac {\sin (c+d x) \left (-5 a^3 C+3 a^2 b B-a b^2 (A-4 C)-2 b^3 B\right )}{b^3 d \left (a^2-b^2\right ) \sqrt {\cos (c+d x)}}-\frac {\left (-5 a^4 C+3 a^3 b B-a^2 b^2 (A-7 C)-5 a b^3 B+3 A b^4\right ) \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{b^3 d (a-b) (a+b)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 2720
Rule 2884
Rule 3081
Rule 3134
Rule 3138
Rule 4197
Rubi steps
\begin {align*} \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x))^2} \, dx &=\int \frac {C+B \cos (c+d x)+A \cos ^2(c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (b+a \cos (c+d x))^2} \, dx\\ &=-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (b+a \cos (c+d x))}-\frac {\int \frac {\frac {1}{2} \left (-3 A b^2+3 a b B-5 a^2 C+2 b^2 C\right )+b (b B-a (A+C)) \cos (c+d x)+\frac {3}{2} \left (A b^2-a (b B-a C)\right ) \cos ^2(c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (b+a \cos (c+d x))} \, dx}{b \left (a^2-b^2\right )}\\ &=\frac {\left (3 A b^2-3 a b B+5 a^2 C-2 b^2 C\right ) \sin (c+d x)}{3 b^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (b+a \cos (c+d x))}-\frac {2 \int \frac {-\frac {3}{4} \left (3 a^2 b B-2 b^3 B-a b^2 (A-4 C)-5 a^3 C\right )+\frac {1}{2} b \left (3 A b^2-3 a b B+2 a^2 C+b^2 C\right ) \cos (c+d x)-\frac {1}{4} a \left (3 A b^2-3 a b B+5 a^2 C-2 b^2 C\right ) \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (b+a \cos (c+d x))} \, dx}{3 b^2 \left (a^2-b^2\right )}\\ &=\frac {\left (3 A b^2-3 a b B+5 a^2 C-2 b^2 C\right ) \sin (c+d x)}{3 b^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}+\frac {\left (3 a^2 b B-2 b^3 B-a b^2 (A-4 C)-5 a^3 C\right ) \sin (c+d x)}{b^3 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (b+a \cos (c+d x))}-\frac {4 \int \frac {\frac {1}{8} \left (9 a^3 b B-12 a b^3 B-a^2 b^2 (3 A-16 C)-15 a^4 C+2 b^4 (3 A+C)\right )+\frac {1}{4} b \left (6 a^2 b B-3 b^3 B-a b^2 (3 A-7 C)-10 a^3 C\right ) \cos (c+d x)+\frac {3}{8} a \left (3 a^2 b B-2 b^3 B-a b^2 (A-4 C)-5 a^3 C\right ) \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{3 b^3 \left (a^2-b^2\right )}\\ &=\frac {\left (3 A b^2-3 a b B+5 a^2 C-2 b^2 C\right ) \sin (c+d x)}{3 b^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}+\frac {\left (3 a^2 b B-2 b^3 B-a b^2 (A-4 C)-5 a^3 C\right ) \sin (c+d x)}{b^3 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (b+a \cos (c+d x))}+\frac {4 \int \frac {-\frac {1}{8} a \left (9 a^3 b B-12 a b^3 B-a^2 b^2 (3 A-16 C)-15 a^4 C+2 b^4 (3 A+C)\right )+\frac {1}{8} a^2 b \left (3 A b^2-3 a b B+5 a^2 C-2 b^2 C\right ) \cos (c+d x)}{\sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{3 a b^3 \left (a^2-b^2\right )}-\frac {\left (3 a^2 b B-2 b^3 B-a b^2 (A-4 C)-5 a^3 C\right ) \int \sqrt {\cos (c+d x)} \, dx}{2 b^3 \left (a^2-b^2\right )}\\ &=-\frac {\left (3 a^2 b B-2 b^3 B-a b^2 (A-4 C)-5 a^3 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^3 \left (a^2-b^2\right ) d}+\frac {\left (3 A b^2-3 a b B+5 a^2 C-2 b^2 C\right ) \sin (c+d x)}{3 b^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}+\frac {\left (3 a^2 b B-2 b^3 B-a b^2 (A-4 C)-5 a^3 C\right ) \sin (c+d x)}{b^3 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (b+a \cos (c+d x))}-\frac {\left (3 A b^4+3 a^3 b B-5 a b^3 B-a^2 b^2 (A-7 C)-5 a^4 C\right ) \int \frac {1}{\sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{2 b^3 \left (a^2-b^2\right )}+\frac {\left (3 A b^2-3 a b B+5 a^2 C-2 b^2 C\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{6 b^2 \left (a^2-b^2\right )}\\ &=-\frac {\left (3 a^2 b B-2 b^3 B-a b^2 (A-4 C)-5 a^3 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^3 \left (a^2-b^2\right ) d}+\frac {\left (3 A b^2-3 a b B+5 a^2 C-2 b^2 C\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 b^2 \left (a^2-b^2\right ) d}-\frac {\left (3 A b^4+3 a^3 b B-5 a b^3 B-a^2 b^2 (A-7 C)-5 a^4 C\right ) \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{(a-b) b^3 (a+b)^2 d}+\frac {\left (3 A b^2-3 a b B+5 a^2 C-2 b^2 C\right ) \sin (c+d x)}{3 b^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}+\frac {\left (3 a^2 b B-2 b^3 B-a b^2 (A-4 C)-5 a^3 C\right ) \sin (c+d x)}{b^3 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (b+a \cos (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 17.32, size = 472, normalized size = 1.22 \begin {gather*} \frac {\frac {2 \left (9 a^2 A b^2-12 A b^4-27 a^3 b B+30 a b^3 B+45 a^4 C-44 a^2 b^2 C-4 b^4 C\right ) \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a+b}+\frac {\left (12 a A b^3-24 a^2 b^2 B+12 b^4 B+40 a^3 b C-28 a b^3 C\right ) \left (2 F\left (\left .\frac {1}{2} (c+d x)\right |2\right )-\frac {2 b \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a+b}\right )}{a}+\frac {2 \left (3 a^2 A b^2-9 a^3 b B+6 a b^3 B+15 a^4 C-12 a^2 b^2 C\right ) \cos (2 (c+d x)) \left (-2 a b E\left (\left .\text {ArcSin}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )+2 b (a+b) F\left (\left .\text {ArcSin}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )+\left (a^2-2 b^2\right ) \Pi \left (-\frac {a}{b};\left .\text {ArcSin}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )\right ) \sin (c+d x)}{a^2 b \sqrt {1-\cos ^2(c+d x)} \left (-1+2 \cos ^2(c+d x)\right )}}{12 (a-b) b^3 (a+b) d}+\frac {\sqrt {\cos (c+d x)} \left (\frac {2 \sec (c+d x) (b B \sin (c+d x)-2 a C \sin (c+d x))}{b^3}+\frac {a^2 A b^2 \sin (c+d x)-a^3 b B \sin (c+d x)+a^4 C \sin (c+d x)}{b^3 \left (-a^2+b^2\right ) (b+a \cos (c+d x))}+\frac {2 C \sec (c+d x) \tan (c+d x)}{3 b^2}\right )}{d} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1003\) vs.
\(2(455)=910\).
time = 0.66, size = 1004, normalized size = 2.59
method | result | size |
default | \(\text {Expression too large to display}\) | \(1004\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{{\cos \left (c+d\,x\right )}^{5/2}\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________